function getQueryVariable() {
    let url = window.location.href
    let urlStr = url.split('?')[1]
    const urlSearchParams = new URLSearchParams(urlStr)
    const result = Object.fromEntries(urlSearchParams.entries())
    return result;
}

function msgFun(flag, msg) {
    if (!flag) {
        return;
    }
    let warning = document.getElementById('warning')
    warning.style.opacity = 1
    warning.innerText = msg
    warning.style.backgroundColor = flag == 200 ? '#82f3cd' : '#f0df47'
    setInterval(() => {
        warning.style.opacity = 0
    }, 3000);
}